#pragma once

#include "dialog.h"
#include "collection.h"

/** 
 * \ingroup ti6
 *
 * \brief
 * The MetaDataDialog class is a subclass of Dialog. It represents the
 * dialog where xml data for an collection image can be entered.
 * The dialog design is stored in the resource file. A MetaDataDialog
 * is associated with a Collection (the place to store all metadata).
 *
 * Copyright (c) Academie voor ICT en Media 2007 - 2008
 */
class MetaDataDialog: public Dialog
{
public:
	/**
	 \brief
	 Initialize the dialog.
	 */
	MetaDataDialog();

	/**
	 \brief
	 Deconstruct the dialog.
	 */
	virtual ~MetaDataDialog() {}

	/**
	 \brief
	 Get a pointer to the collection. This value must have been set using
	 setCollection().
	 
	 \return A pointer to the collection instance.
	 */
	Collection* collection() const;

	/**
	 \brief
	 Set the collection for which the metadata will be showed or changed.
	 
	 \param *c A pointer to the collection.
	 */
	void setCollection( Collection *c );

	/**
	 \brief
	 Get the image number. This value must have been set using setImageNum().
	 
	 \return The image number.
	 */
	int imageNum() const;

	/**
	 \brief
	 Set the number of the image for which the metadata will be showed or changed.
	 
	 \param imageNum The image number.
	 */
	void setImageNum( int imageNum );

	/**
	 \brief
	 Handle messages, specific for this dialog box. This function will be
	 called when the dialog box is made visible by show().
	 
	 \param uMsg The message id.
	 \param wParam 32 bits value, specific to the message.
	 \param lParam 32 bits value, specific to the message.
	 \return Typically, the function should return TRUE if it processed the
	   message completely, and FALSE if it did not.
	 */
	virtual BOOL handleMessage( UINT uMsg, WPARAM wParam, LPARAM lParam );
private:
	/**
	 The collection for which the metadata will be changed.
	 */
	Collection *_collection;

	/**
	 The number of the image for which the metadata will be changed.
	 */
	int _imageNum;
};
